import { ControlVOBase } from '@/core/modules';
import { IParam } from '../../common';
import { ICtrlService } from '../../modules';
import { IDECtrlAbility } from '../ability';
import { DECtrlActionType } from '../event';
import { ICtrlControllerParams } from './i-ctrl-controller-params';

/**
 * 数据能力部件控制器参数
 *
 * @export
 * @interface IWidgetsControllerParams
 */
export interface IDECtrlControllerParams<T, A extends IDECtrlAbility>
	extends ICtrlControllerParams<T | DECtrlActionType, A> {
	/**
	 * 打开视图
	 *
	 * @type {Function)}
	 * @memberof IDECtrlControllerParams
	 */
	openView: Function | undefined;

	/**
	 * 新建视图
	 *
	 * @type {Function}
	 * @memberof IDECtrlControllerParams
	 */
	newView: Function | undefined;

	/**
	 * vo对象
	 *
	 * @memberof IDECtrlControllerParams
	 */
	controlVO?: new (data: IParam) => ControlVOBase;

	/**
	 * 部件服务
	 *
	 * @type {ICtrlService<ControlVOBase>}
	 * @memberof IDECtrlControllerParams
	 */
	ctrlService?: ICtrlService<ControlVOBase>;

	/**
	 * 部件节点ID
	 *
	 * @type {string}
	 * @memberof ICtrlControllerParams
	 */
	controlID: string;
}
